package admin

import (
	"context"
	"server/internal/model"
	"server/internal/service"

	"server/api/admin/system"
)

func (c *ControllerSystem) ConfigCategoryList(ctx context.Context, req *system.ConfigCategoryListReq) (res *system.ConfigCategoryListRes, err error) {
	res = new(system.ConfigCategoryListRes)
	res.List, res.Total, err = service.SystemConfigCategory().List(ctx, model.SystemConfigCategoryListInput{
		Name:     req.Name,
		Page:     req.Page,
		PageSize: req.PageSize,
	})
	return
}
